package com.wicket.okrapp.web.contorller;

import com.wicket.okrapp.biz.service.PowerService;
import com.wicket.okrapp.biz.service.dto.req.*;
import com.wicket.okrapp.biz.service.dto.res.*;
import com.wicket.okrapp.common.ro.OkrResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/app/power/")
public class PowerController {

  @Autowired
  PowerService powerService;

  /**
   * D3查询当前个人权限详情
   */
    @PostMapping("queryCurrentPersonalPowerDetail")
    public OkrResult<QueryCurrentPersonalPowerDetailRespDto> queryCurrentPersonalPowerDetail(@RequestBody @Validated QueryCurrentPersonalPowerDetailReqDto reqDTO){
    return OkrResult.success(powerService.queryCurrentPersonalPowerDetail(reqDTO));
    }
/**
   * D3查询中基层个人管理权限详情(公共)
   */
    @PostMapping("queryMidBasicPersonalPowerDetailCom")
    public OkrResult<QueryMidBasicPersonalPowerDetailComRespDto> queryMidBasicPersonalPowerDetailCom(@RequestBody @Validated QueryMidBasicPersonalPowerDetailComReqDto reqDTO){
    return OkrResult.success(powerService.queryMidBasicPersonalPowerDetailCom(reqDTO));
    }
/**
   * D3执行分析高中基层超级特权管理权限(公共)
   */
    @PostMapping("implementAnalyseTopMidBasicSuperMgtPowerCom")
    public OkrResult<ImplementAnalyseTopMidBasicSuperMgtPowerComRespDto> implementAnalyseTopMidBasicSuperMgtPowerCom(@RequestBody @Validated ImplementAnalyseTopMidBasicSuperMgtPowerComReqDto reqDTO){
    return OkrResult.success(powerService.implementAnalyseTopMidBasicSuperMgtPowerCom(reqDTO));
    }
}
